package cxf.spring.demo.service;

import cxf.spring.demo.domain.user.User;
import cxf.spring.demo.domain.user.UserList;
import cxf.spring.demo.storage.ServerStorage;

import javax.jws.WebService;

/**
 * User: Vlad Vinichenko (akerigan@gmail.com)
 * Date: 06.03.2009
 * Time: 22:00:23
 */
@WebService(endpointInterface = "cxf.spring.demo.service.UserService")
public class UserServiceImpl implements UserService {

    ServerStorage serverStorage;

    public void setServerStorage(ServerStorage serverStorage) {
        this.serverStorage = serverStorage;
    }

    public User getInfo(String login) throws Exception {
        return serverStorage.getUser(login);
    }

    public void updateInfo(User user) throws Exception {
        serverStorage.updateUser(user);
    }

    public UserList getUserList() throws Exception {
        return serverStorage.getUserList();
    }
}
